// 导入用户集合
const { Article } = require('../../../model/article');

module.exports = async (req, res) => {
    const { id } = req.params
  const article = await Article.findOne({_id: id}).populate('category').populate('author', 'username nickname')
  res.json({
      data: article
  })
}